2008-06-28 07:55:30 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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 07:55:30 +00:00
|
|
|
|
|
|
|
#ifndef nsMenuUtilsX_h_
|
|
|
|
#define nsMenuUtilsX_h_
|
|
|
|
|
|
|
|
#include "nscore.h"
|
2008-07-28 04:46:33 +00:00
|
|
|
#include "nsMenuBaseX.h"
|
2008-06-28 07:55:30 +00: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 07:56:40 +00:00
|
|
|
void DispatchCommandTo(nsIContent* aTargetContent);
|
2009-04-30 06:48:14 +00:00
|
|
|
NSString* GetTruncatedCocoaLabel(const nsString& itemLabel);
|
2012-08-22 15:56:38 +00:00
|
|
|
uint8_t GeckoModifiersForNodeAttribute(const nsString& modifiersAttribute);
|
|
|
|
unsigned int MacModifiersForGeckoModifiers(uint8_t geckoModifiers);
|
2008-06-28 07:55:30 +00:00
|
|
|
nsMenuBarX* GetHiddenWindowMenuBar(); // returned object is not retained
|
|
|
|
NSMenuItem* GetStandardEditMenuItem(); // returned object is not retained
|
2011-09-29 06:19:26 +00:00
|
|
|
bool NodeIsHiddenOrCollapsed(nsIContent* inContent);
|
2009-01-23 15:45:03 +00:00
|
|
|
int CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuObjectX* aChild);
|
2008-06-28 07:55:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // nsMenuUtilsX_h_
|