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