2011-08-08 10:31:32 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-08-08 10:31:32 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIDOMDocumentFragment;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An interface for initialization of XUL context menu builder
|
|
|
|
* and for triggering of menuitem actions with assigned identifiers.
|
|
|
|
*/
|
|
|
|
|
2011-08-18 09:37:26 -07:00
|
|
|
[scriptable, uuid(eb6b42c0-2f1c-4760-b5ca-bdc9b3ec77d4)]
|
2011-08-08 10:31:32 -07:00
|
|
|
interface nsIXULContextMenuBuilder : nsISupports
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize builder before building.
|
|
|
|
*
|
|
|
|
* @param aDocumentFragment the fragment that will be used to append top
|
|
|
|
* level elements
|
|
|
|
*
|
2011-08-18 09:37:26 -07:00
|
|
|
* @param aGeneratedItemIdAttrName the name of the attribute that will be
|
|
|
|
* used to mark elements as generated and for menuitem identification
|
2011-08-08 10:31:32 -07:00
|
|
|
*/
|
|
|
|
void init(in nsIDOMDocumentFragment aDocumentFragment,
|
2011-08-18 09:37:26 -07:00
|
|
|
in AString aGeneratedItemIdAttrName);
|
2011-08-08 10:31:32 -07:00
|
|
|
|
|
|
|
/**
|
2011-08-18 09:37:26 -07:00
|
|
|
* Invoke the action of the menuitem with assigned id aGeneratedItemId.
|
2011-08-08 10:31:32 -07:00
|
|
|
*
|
2011-08-18 09:37:26 -07:00
|
|
|
* @param aGeneratedItemId the menuitem id
|
2011-08-08 10:31:32 -07:00
|
|
|
*/
|
2011-08-18 09:37:26 -07:00
|
|
|
void click(in DOMString aGeneratedItemId);
|
2011-08-08 10:31:32 -07:00
|
|
|
|
|
|
|
};
|