1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/cocoa/nsMenuUtilsX.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsMenuUtilsX_h_ 1.10 +#define nsMenuUtilsX_h_ 1.11 + 1.12 +#include "nscore.h" 1.13 +#include "nsMenuBaseX.h" 1.14 + 1.15 +#import <Cocoa/Cocoa.h> 1.16 + 1.17 +class nsIContent; 1.18 +class nsString; 1.19 +class nsMenuBarX; 1.20 + 1.21 +// Namespace containing utility functions used in our native menu implementation. 1.22 +namespace nsMenuUtilsX 1.23 +{ 1.24 + void DispatchCommandTo(nsIContent* aTargetContent); 1.25 + NSString* GetTruncatedCocoaLabel(const nsString& itemLabel); 1.26 + uint8_t GeckoModifiersForNodeAttribute(const nsString& modifiersAttribute); 1.27 + unsigned int MacModifiersForGeckoModifiers(uint8_t geckoModifiers); 1.28 + nsMenuBarX* GetHiddenWindowMenuBar(); // returned object is not retained 1.29 + NSMenuItem* GetStandardEditMenuItem(); // returned object is not retained 1.30 + bool NodeIsHiddenOrCollapsed(nsIContent* inContent); 1.31 + int CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuObjectX* aChild); 1.32 +} 1.33 + 1.34 +#endif // nsMenuUtilsX_h_