1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/interfaces/xul/nsIDOMXULCommandEvent.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim:set ts=2 sw=2 sts=2 et cindent: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +/** 1.11 + * This interface is supported by command events, which are dispatched to 1.12 + * XUL elements as a result of mouse or keyboard activation. 1.13 + */ 1.14 + 1.15 +#include "nsIDOMUIEvent.idl" 1.16 + 1.17 +[scriptable, builtinclass, uuid(2d5b6e19-74bb-40af-9aac-59a1e53e3fcc)] 1.18 +interface nsIDOMXULCommandEvent : nsIDOMUIEvent 1.19 +{ 1.20 + /** 1.21 + * Command events support the same set of modifier keys as mouse and key 1.22 + * events. 1.23 + */ 1.24 + readonly attribute boolean ctrlKey; 1.25 + readonly attribute boolean shiftKey; 1.26 + readonly attribute boolean altKey; 1.27 + readonly attribute boolean metaKey; 1.28 + 1.29 + /** 1.30 + * If the command event was redispatched because of a command= attribute 1.31 + * on the original target, sourceEvent will be set to the original DOM Event. 1.32 + * Otherwise, sourceEvent is null. 1.33 + */ 1.34 + readonly attribute nsIDOMEvent sourceEvent; 1.35 + 1.36 + /** 1.37 + * Creates a new command event with the given attributes. 1.38 + */ 1.39 + void initCommandEvent(in DOMString typeArg, 1.40 + in boolean canBubbleArg, 1.41 + in boolean cancelableArg, 1.42 + in nsIDOMWindow viewArg, 1.43 + in long detailArg, 1.44 + in boolean ctrlKeyArg, 1.45 + in boolean altKeyArg, 1.46 + in boolean shiftKeyArg, 1.47 + in boolean metaKeyArg, 1.48 + in nsIDOMEvent sourceEvent); 1.49 +};