2008-06-28 00:55:30 -07:00
|
|
|
/* -*- Mode: C++; 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/. */
|
2008-06-28 00:55:30 -07:00
|
|
|
|
|
|
|
#ifndef nsMenuUtilsX_h_
|
|
|
|
#define nsMenuUtilsX_h_
|
|
|
|
|
|
|
|
#include "nscore.h"
|
2009-04-01 14:59:02 -07:00
|
|
|
#include "nsEvent.h"
|
2008-07-27 21:46:33 -07:00
|
|
|
#include "nsMenuBaseX.h"
|
2008-06-28 00:55:30 -07:00
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
class nsIContent;
|
|
|
|
class nsString;
|
|
|
|
class nsMenuBarX;
|
|
|
|
|
|
|
|
// Namespace containing utility functions used in our native menu implementation.
|
|
|
|
namespace nsMenuUtilsX
|
|
|
|
{
|
2009-06-30 00:56:40 -07:00
|
|
|
void DispatchCommandTo(nsIContent* aTargetContent);
|
2009-04-29 23:48:14 -07:00
|
|
|
NSString* GetTruncatedCocoaLabel(const nsString& itemLabel);
|
2012-08-22 08:56:38 -07:00
|
|
|
uint8_t GeckoModifiersForNodeAttribute(const nsString& modifiersAttribute);
|
|
|
|
unsigned int MacModifiersForGeckoModifiers(uint8_t geckoModifiers);
|
2008-06-28 00:55:30 -07:00
|
|
|
nsMenuBarX* GetHiddenWindowMenuBar(); // returned object is not retained
|
|
|
|
NSMenuItem* GetStandardEditMenuItem(); // returned object is not retained
|
2011-09-28 23:19:26 -07:00
|
|
|
bool NodeIsHiddenOrCollapsed(nsIContent* inContent);
|
2009-01-23 07:45:03 -08:00
|
|
|
int CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuObjectX* aChild);
|
2008-06-28 00:55:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // nsMenuUtilsX_h_
|